package com.javasm.exercise;

import javax.print.attribute.standard.MediaSize;

/**
 * @classname:Strudnet
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/26 21:39
 * @version: 0.1
 * @since:1.8
 */
public class Student{
    private static String name;
    private int stuNo;
    private  String gender;
    private Computer computer;
    public Student() {
    }

    public Student(String name, int stuNo, String gender,Computer computer) {
        this.name = name;
        this.stuNo = stuNo;
        this.gender = gender;
        this.computer = computer;
    }

    public String getName() {
        return name;
    }

    public Computer getComputer() {
        return computer;
    }
    public void setComputer(Computer computer) {
        this.computer = computer;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStuNo() {
        return stuNo;
    }

    public void setStuNo(int stuNo) {
        this.stuNo = stuNo;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public  static void study(){
        System.out.println("学生"+name+"在学习");
    }
    public static void eat(){
        System.out.println("学生"+name+"在吃饭");
    }
    public void play(){
        System.out.println("学生"+name+"拥有一台cpu为"+computer.getCpu()+"的电脑");
    }

}
